package com.nahan.secondapplication;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;

/**
 * on 2020/6/5
 */
public class TestLayoutAdapter extends BaseMultiItemQuickAdapter<TestLayoutBean, BaseViewHolder> {

    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public TestLayoutAdapter(List<TestLayoutBean> data) {
        super(data);
        //设置当传入的itemType为某个常量显示不同的item
//        addItemType(TestLayoutBean.EDIT, R.layout.item_list_edit);
//        addItemType(TestLayoutBean.CHECK,R.layout.item_list_check);
//        addItemType(TestLayoutBean.SELECT,R.layout.item_list_select);
    }

    @Override
    protected void convert(BaseViewHolder helper, TestLayoutBean item) {
        switch (helper.getItemViewType()){
            case TestLayoutBean.EDIT:
                break;
            case TestLayoutBean.CHECK:
                break;
            case TestLayoutBean.SELECT:
                break;
        }
    }
}
